package com.ycz.pattern.behaviour.observerpattern;

/**
 * @Description
 * @ClassName OctalObserver
 * @Author yanchengzhi
 * @date 2023.10.20 02:05
 */
public class OctalObserver extends Observer {

    public OctalObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("八进制字符串：" + Integer.toOctalString(subject.getState()));
    }
}
